In eukaryotes, Rad51 protein is responsible for the recombinational repair of double-strand DNA breaks. Rad51 monomers cooperatively assemble on exonuclease-processed broken ends forming helical nucleo-protein filaments that can pair with homologous regions of sister chromatids. Homologous pairing allows the broken ends to be reunited in a complex but error-free repair process. Rad51 protein has ATPase activity but its role is poorly understood, as homologous pairing is independent of adenosine triphosphate (ATP) hydrolysis. Here we use magnetic tweezers and electron microscopy to investigate how changes of DNA twist affect the structure of Rad51-DNA complexes and how ATP hydrolysis participates in this process. We show that Rad51 protein can bind to double-stranded DNA in two different modes depending on the enforced DNA twist. The stretching mode is observed when DNA is unwound towards a helical repeat of 18.6 bp/turn, whereas a non-stretching mode is observed when DNA molecules are not permitted to change their native helical repeat. We also show that the two forms of complexes are interconvertible and that by enforcing changes of DNA twist one can induce transitions between the two forms. Our observations permit a better understanding of the role of ATP hydrolysis in Rad51-mediated homologous pairing and strand exchange.